<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<script>
    class Star {
        constructor(name) {
            this.name = name;
        }

        say1() {
            console.log("say1()");
        }

        say(res) {
            console.log(res);
        }
    }

    var star = new Star('jack');
    console.log(star.name);
    star.say1();
    star.say('hello');
</script>

<body>

</body>

</html>